package com.cn.aam.checaiduo.ui.arouter;

import android.content.Context;

import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.callback.NavigationCallback;
import com.alibaba.android.arouter.launcher.ARouter;
import com.cn.aam.checaiduo.Const;
import com.cn.aam.checaiduo.R;
import com.cn.aam.checaiduo.bean.other.BasicUserInfoB;
import com.cn.aam.checaiduo.ui.arouter.section.RouterMore;
import com.cn.aam.checaiduo.ui.arouter.section.RouterWeb;
import com.cn.aam.checaiduo.ui.more.HelpCenterDetailIActivity;
import com.cn.aam.checaiduo.ui.more.JustShowImageActivity;
import com.orhanobut.logger.Logger;

/**
 * @author 艹羊
 * @project Checaiduo_Android
 * @date 2017/7/24 上午11:50
 * @description
 */

public class UIRouter {

    private UIRouter() {
    }

    public static UIRouter getInstance() {
        return UIRouter.Holder.INSTANCE;
    }

    private static class Holder {
        static UIRouter INSTANCE = new UIRouter();
    }


    //模块【首页】
    public static class HOME {
        public static final String GROUP = "home";//组
        public static final String AC_MAIN = "/home/main";//主界面
        public static final String AC_PLATFORMINTRODUCE = "/me/PlatformIntroduce";//平台介绍
        public static final String AC_BEGINPARK = "/me/BeginPark";//新手乐园
    }

    //模块【投资】
    public static class INVEST {
        public final static String GROUP = "invest";

        public final static String AUTH = "/otherMore/auth";//实名认证
    }

    //模块【我的】
    public static class ME {
        public static final String GROUP = "me";//组
        public static final String AC_INVITEPRIZES = "/me/InvitePrizes";//邀请有奖
        public static final String AC_SIGNIN = "/me/SignIn";//签到
        public static final String AC_AUTORESERVATION = "/me/AutoResevation";//自动预约
        public static final String AC_CHOOSEDATE = "/me/ChooseDate";//选择时间
        public static final String AC_VOUCHER = "/me/Voucher";//理财券
        public static final String AC_INVESTRECORDER = "/me/InvestRecorder";//投资记录
        public static final String AC_INVESTRECORDERDETAIL = "/me/InvestRecorderDwtail";//投资记录详情
        public static final String AC_MESSAGEDETAIL = "/me/MessageDetail";//公告详情
        public static final String AC_MESSAGELIST = "/me/MessageList";//公告列表
        public static final String AC_PDFVIEW = "/me/PDFView";//pdf界面
        public static final String AC_POINTDETAIL = "/me/PointDetail";//积分详情
        public static final String AC_POINTINTRODUCE = "/me/PointIntroduce";//积分攻略


    }

    //模块【更多】
    public static class MORE {
        public final static String AUTH = "/otherMore/auth";//实名认证
        public final static String AUTH_STEP02 = "/otherMore/authStep02";//实名认证第2步
        public final static String AUTH_RESULT = "/otherMore/authResult";//实名认证，结果

        public final static String CHANGE_MOBILE_STEP1 = "/otherMore/changeMobileStep1";//修改手机号第1步
        public final static String CHANGE_MOBILE_STEP2 = "/otherMore/changeMobileStep2";//修改手机号第2步

        public final static String TASK_CENTER = "/otherMore/taskCenter";//任务中心
        public final static String HELP_CENTER = "/otherMore/helpCenter";//帮助中心
        public final static String SUB_HELP_CENTER = "/otherMore/subHelpCenter";//帮助中心子列表
        public final static String JUST_SHOW_IMAGE = "/otherMore/justShowImage";//显示长图

        public final static String SETTING = "/otherMore/setting";//系统设置
        public final static String CHANGE_MOBILE_PWD = "/otherMore/changePwd";//修改手机密码
    }

    //模块【网页视图】
    public static class WEB {
        public final static String NORMAL = "/web/normal";//【红色标题栏web】
        public final static String RED_TOOLBAR = "/web/redToolBar";//【红色标题栏web】
    }


    //通用
    public void openPage(Context context, String url) {
        ARouter.getInstance().build(url).navigation(context);
    }

    //通用带intent flag
    public void openPage(Context context, String url, int flag) {
        ARouter.getInstance().build(url)
                .withFlags(flag).
                navigation(context);
    }

    //获取【网页】模块
    public RouterWeb getWeb() {
        return RouterWeb.getInstance();
    }

    //获取【更多】模块
    public RouterMore getMore() {
        return RouterMore.getInstance();
    }

}
